package com.biwin.module.org.api.dto;

import com.biwin.common.app.dto.BasicBwDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * Position Data Transform Object
 *
 * @author biwin
 * @since 0.0.1
 */
@ApiModel(value = "岗位信息 - PositionDto",
        description = "新增或修改岗位的前端传参模型")
public class PositionDto extends BasicBwDto {

    private static final long serialVersionUID = 1980614686445120325L;

    @ApiModelProperty("父级岗位id")
    @NotNull(message = "父级岗位id不能为空")
    private Long parentId;

    @ApiModelProperty("岗位名称")
    @NotBlank(message = "岗位名称不能为空")
    @Length(min = 1, max = 60, message = "岗位名称最多60个字符")
    private String name;

    @ApiModelProperty("岗位类型")
    @NotNull(message = "岗位类型不能为空")
    private Integer type;

    @ApiModelProperty("是否是管理员岗位")
    @NotNull(message = "是否管理员岗位不能为空")
    private Boolean administrator;

    @ApiModelProperty("是否是共享岗位")
    @NotNull(message = "是否共享岗位不能为空")
    private Boolean shared;

    @ApiModelProperty("是否是复制岗位")
    @NotNull(message = "是否复制岗位不能为空")
    private Boolean copied;

    @ApiModelProperty("岗位状态 true-启用,false-禁用")
    @NotNull(message = "岗位状态不能为空")
    private Boolean enabled;

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Boolean getAdministrator() {
        return administrator;
    }

    public void setAdministrator(Boolean administrator) {
        this.administrator = administrator;
    }

    public Boolean getShared() {
        return shared;
    }

    public void setShared(Boolean shared) {
        this.shared = shared;
    }

    public Boolean getCopied() {
        return copied;
    }

    public void setCopied(Boolean copied) {
        this.copied = copied;
    }

    public Boolean getEnabled() {
        return enabled;
    }

    public void setEnabled(Boolean enabled) {
        this.enabled = enabled;
    }
}
